#pragma once
#include "Engine.h"
#include "CEGUI.h"
class CUIEngine: public CEngine {
public:
    CUIEngine(void);
    virtual ~CUIEngine();
    struct lua_State* lua() { return mLua; }
protected:
    virtual void createScene();
    //virtual bool initialise(); 
    virtual void destroyScene(); 
    virtual bool frameStarted(const Ogre::FrameEvent& evt);
    virtual void addResourceLocations();
    virtual void animate(int time);
    bool nextLocation();
    virtual bool processUnbufferedKeyInput(const Ogre::FrameEvent& evt); 
    virtual bool processUnbufferedMouseInput(const Ogre::FrameEvent& evt); 
    void initLua();
    void destroyLua();
    bool test(const CEGUI::EventArgs& );
    Ogre::Entity* ogreHead;
    Ogre::SceneNode* headNode;

    struct lua_State *mLua;
};